package com.shire.shire_interface.service.commandcenter.queues;

import com.shire.shire_interface.constants.WxConstants;
import com.shire.shire_interface.model.command.WxCommand;
import com.shire.shire_interface.model.user.WxAccount;

import java.util.Date;

//有间隔的指令队列
public class GappedCommandQueue {
    protected Date lastReturnTime;
    protected WxConstants.CmdPriority queuePriority;

    protected WxCommand curCmd;

    protected WxAccount wxAccount;

    public Date getLastReturnTime() {
        return lastReturnTime;
    }

    public void setLastReturnTime(Date lastReturnTime) {
        this.lastReturnTime = lastReturnTime;
    }

    public GappedCommandQueue(){

    }

    public GappedCommandQueue(WxAccount wxAccount, WxConstants.CmdPriority priority){
        this.wxAccount = wxAccount;
        this.queuePriority = priority;
    }

    public WxCommand getNextCommand(){
        //更新间隔时间
        WxCommand cmd = curCmd;
        curCmd = null;
        return cmd;
    }
}
